import Vue from 'vue'
import VueRouter from 'vue-router'

import Error404 from '@/views/error/404';
import Login from '@/views/login/index';


Vue.use(VueRouter)

/* Layout */
// import Layout from '@/layout'

const routes = [{
        path: '/404',
        name: '走丢了',
        component: Error404,
    }, {
        path: '/login',
        name: '登录',
        component: Login
    },
    {
        path: '/',
        name: '登录',
        component: Login,
    },
    {
        path: '*',
        redirect: '/404'
    }

]

const router = new VueRouter({
    mode: 'history',
    routes
})

export default router